package com.lzs.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lzs.entity.Dept;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lzs.util.R;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 部门表 服务类
 * </p>
 *
 * @author 刘中帅
 * @since 2020-11-24
 */
@Service
public interface DeptService extends IService<Dept> {
    List<Dept> selectDeptTree();//  部门树
    Page<Dept> selectAllDeptPage(Integer page,Integer limit,Dept dept); // 分页
    R insertOrUpdateDept(Dept dept);
    // 根据当前部门ID查询拥有的仓库
    List<Long> selectWarehouseByDeptId(Long deptId);
    R updateWarehouseByDeptId(Long deptId,List<Long> warehouseIds);
    R  findByDeptId(Long deptId);
}
